package com.lagou.edu.homework.service;

import com.lagou.edu.pojo.LagouAuthCode;

public interface LagouAuthCodeService {
    /**
     * 保存发送的验证码
     *
     * @param authCode
     * @return
     */
    Boolean saveAuthCode(LagouAuthCode authCode);

    /**
     * 校验邮箱和验证码
     *
     * @param email
     * @param code
     * @return
     */
    Boolean validateEmailAndCode(String email, String code);

    /**
     * 校验该邮件是否有1分钟内发送的验证码
     *
     * @param email
     * @return
     */
    Boolean validateByEmail(String email);
}
